package com.reggie.common.enums.front;

import com.reggie.common.ResultResponseVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 早睡蛋
 * @Date 2022/9/27 19:30:34
 * @Desc:
 */
@Getter
@AllArgsConstructor
public enum AddressBookEnum {

    SUCCESS(200,"ok"),
    FAIL(400,"fail"),

    ADD_OK(200,"添加成功"),
    ADD_FAIL(400,"添加失败"),

    SET_DEFAULT_OK(200,"已设置为默认地址"),
    SET_DEFAULT_FAIL(400,"设置默认地址失败"),

    UPDATE_OK(200,"更新地址信息成功"),
    UPDATE_FAIL(400,"更新地址信息失败"),




    ;


    AddressBookEnum(int code, String message) {
        this.resultResponseVo =  ResultResponseVo.defaultResultResponse();
        resultResponseVo.setCode(code);
        resultResponseVo.setMessage(message);
    }

    public int getCode(){
        return resultResponseVo.getCode();
    }

    public String getMessage(){
        return resultResponseVo.getMessage();
    }

    public ResultResponseVo getResult() {
        return resultResponseVo;
    }


    private final ResultResponseVo resultResponseVo;


}
